﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="products.aspx.cs" Inherits="Web.products" %>

<%@ Register Assembly="ZedGraph.Web" Namespace="ZedGraph.Web" TagPrefix="cc1" %>



<asp:Content runat="server" ID="product" ContentPlaceHolderID="MainContent">

    <div id="zedgraph" >
        <div id="方式1" style="float: left; width: 300px;">
            <ul>
                <li>图表ImageTag:</li>
                <li>
                    <asp:Button ID="btn_print" OnClientClick="javascript:" OnClick="btn_print_Click" runat="server" Text="Button" /></li>
                <li>
                    <cc1:ZedGraphWeb  ClientIDMode="Static"  RenderMode="ImageTag" Width="300" RenderedImagePath="~/Content/Images" ID="ZedGraphWeb1" runat="server"></cc1:ZedGraphWeb>
                </li>
            </ul>
        </div>

        <div id="方式2" style=" width: 300px; margin: auto;">
            <ul>

                <li>图表RawImage:</li>
                <li>
                    <img id="zed021" src="../../myzedgraph.aspx" width="300" /></li>
        </div>
    </div>
    <div style="clear: both; ">
        <asp:ListView runat="server" ID="listProduct">
            <LayoutTemplate>
                <table border="1">
                    <thead>
                        <tr>
                            <td>id</td>
                            <td>名称</td>
                            <td>图片</td>
                            <td>edit</td>
                            <td>del</td>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:PlaceHolder runat="server" ID="ItemPlaceHolder"></asp:PlaceHolder>
                    </tbody>
                </table>

                <asp:DataPager runat="server" ID="ContactsDataPager" PageSize="5">
                    <Fields>
                        <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowLastPageButton="true"
                            FirstPageText="首页" LastPageText="尾页"
                            NextPageText="下一页" PreviousPageText="上一页" />
                    </Fields>
                </asp:DataPager>
            </LayoutTemplate>
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex+1 %>' />
                            <%--<asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("id") %>' />--%>
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("productname") %>' />
                        </td>
                        <td>
                            <asp:Image ID="Image1" ImageUrl='<%# Web.GlobalPath.imagePath+@"/"+Eval("productimage") %>' runat="server" />
                        </td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" PostBackUrl='<%# Web.GlobalPath.productPath+"/productEdit.aspx?id="+ Eval("id")%>' runat="server">edit</asp:LinkButton></td>
                        <td>
                            <asp:LinkButton ID="LinkButton2" PostBackUrl='<%# Web.GlobalPath.productPath+"/productDel.aspx?id="+ Eval("id").ToString()%>' OnClientClick="return confirm('是否删除？');" runat="server">del</asp:LinkButton></td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:ListView>
    </div>

</asp:Content>
